home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / QuickTime / Programming Stuff / QuickTime 2.1 for Developers / Interfaces / CIncludes / ImageCompression.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-07  |  36.4 KB  |  750 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ImageCompression.h
  3.  
  4.      Contains:    QuickTime interfaces
  5.  
  6.      Version:    
  7.  
  8.      DRI:        Jim Batson
  9.  
  10.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  11.                  All rights reserved.
  12.  
  13.      Warning:    *** APPLE INTERNAL USE ONLY ***
  14.                  This file may contain unreleased API's
  15.  
  16.      BuildInfo:    Built by:            QuickTime
  17.                  With Interfacer:    1.1d11  
  18.                  From:                ImageCompression.i
  19.                      Revision:        0
  20.                      Dated:            08/07/95
  21.                      Last change by:    JB
  22.                      Last comment:    This is a fake header used so interfacer is happy.
  23.  
  24.      Bugs:        Report bugs to Radar component “System Interfaces”, “Latest”
  25.                  List the version information (from above) in the Problem Description.
  26.  
  27. */
  28.  
  29. #ifndef __IMAGECOMPRESSION__
  30. #define __IMAGECOMPRESSION__
  31.  
  32.  
  33. #ifndef __TYPES__
  34. #include <Types.h>
  35. #endif
  36. /*    #include <ConditionalMacros.h>                                */
  37.  
  38. #ifndef __QUICKDRAW__
  39. #include <Quickdraw.h>
  40. #endif
  41. /*    #include <MixedMode.h>                                        */
  42. /*    #include <QuickdrawText.h>                                    */
  43.  
  44. #ifndef __QDOFFSCREEN__
  45. #include <QDOffscreen.h>
  46. #endif
  47. /*    #include <Errors.h>                                            */
  48.  
  49. #ifndef __COMPONENTS__
  50. #include <Components.h>
  51. #endif
  52.  
  53. #ifndef __WINDOWS__
  54. #include <Windows.h>
  55. #endif
  56. /*    #include <Memory.h>                                            */
  57. /*    #include <Events.h>                                            */
  58. /*        #include <OSUtils.h>                                    */
  59. /*    #include <Controls.h>                                        */
  60. /*        #include <Menus.h>                                        */
  61.  
  62. #ifndef __STANDARDFILE__
  63. #include <StandardFile.h>
  64. #endif
  65. /*    #include <Dialogs.h>                                        */
  66. /*        #include <TextEdit.h>                                    */
  67. /*    #include <Files.h>                                            */
  68.  
  69. #ifdef __cplusplus
  70. extern "C" {
  71. #endif
  72.  
  73. #if GENERATINGPOWERPC
  74. #pragma options align=mac68k
  75. #endif
  76.  
  77. #ifdef __CFM68K__
  78. #pragma import on
  79. #endif
  80.  
  81. struct MatrixRecord {
  82.     Fixed                            matrix[3][3];
  83. };
  84. typedef struct MatrixRecord MatrixRecord, *MatrixRecordPtr;
  85.  
  86. struct FixedPoint {
  87.     Fixed                            x;
  88.     Fixed                            y;
  89. };
  90. typedef struct FixedPoint FixedPoint;
  91.  
  92. struct FixedRect {
  93.     Fixed                            left;
  94.     Fixed                            top;
  95.     Fixed                            right;
  96.     Fixed                            bottom;
  97. };
  98. typedef struct FixedRect FixedRect;
  99.  
  100. /* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
  101.  
  102. enum {
  103.     codecInfoDoes1                = (1L << 0),
  104.     codecInfoDoes2                = (1L << 1),
  105.     codecInfoDoes4                = (1L << 2),
  106.     codecInfoDoes8                = (1L << 3),
  107.     codecInfoDoes16                = (1L << 4),
  108.     codecInfoDoes32                = (1L << 5),
  109.     codecInfoDoesDither            = (1L << 6),
  110.     codecInfoDoesStretch        = (1L << 7),
  111.     codecInfoDoesShrink            = (1L << 8),
  112.     codecInfoDoesMask            = (1L << 9),
  113.     codecInfoDoesTemporal        = (1L << 10),
  114.     codecInfoDoesDouble            = (1L << 11),
  115.     codecInfoDoesQuad            = (1L << 12),
  116.     codecInfoDoesHalf            = (1L << 13),
  117.     codecInfoDoesQuarter        = (1L << 14),
  118.     codecInfoDoesRotate            = (1L << 15),
  119.     codecInfoDoesHorizFlip        = (1L << 16),
  120.     codecInfoDoesVertFlip        = (1L << 17),
  121.     codecInfoDoesSkew            = (1L << 18),
  122.     codecInfoDoesBlend            = (1L << 19),
  123.     codecInfoDoesWarp            = (1L << 20),
  124.     codecInfoDoesRecompress        = (1L << 21),
  125.     codecInfoDoesSpool            = (1L << 22),
  126.     codecInfoDoesRateConstrain    = (1L << 23)
  127. };
  128.  
  129. enum {
  130.     codecInfoDepth1                = (1L << 0),
  131.     codecInfoDepth2                = (1L << 1),
  132.     codecInfoDepth4                = (1L << 2),
  133.     codecInfoDepth8                = (1L << 3),
  134.     codecInfoDepth16            = (1L << 4),
  135.     codecInfoDepth32            = (1L << 5),
  136.     codecInfoDepth24            = (1L << 6),
  137.     codecInfoDepth33            = (1L << 7),
  138.     codecInfoDepth34            = (1L << 8),
  139.     codecInfoDepth36            = (1L << 9),
  140.     codecInfoDepth40            = (1L << 10),
  141.     codecInfoStoresClut            = (1L << 11),
  142.     codecInfoDoesLossless        = (1L << 12),
  143.     codecInfoSequenceSensitive    = (1L << 13)
  144. };
  145.  
  146. enum {
  147.     codecFlagUseImageBuffer        = (1L << 0),
  148.     codecFlagUseScreenBuffer    = (1L << 1),
  149.     codecFlagUpdatePrevious        = (1L << 2),
  150.     codecFlagNoScreenUpdate        = (1L << 3),
  151.     codecFlagWasCompressed        = (1L << 4),
  152.     codecFlagDontOffscreen        = (1L << 5),
  153.     codecFlagUpdatePreviousComp    = (1L << 6),
  154.     codecFlagForceKeyFrame        = (1L << 7),
  155.     codecFlagOnlyScreenUpdate    = (1L << 8),
  156.     codecFlagLiveGrab            = (1L << 9),
  157.     codecFlagDontUseNewImageBuffer = (1L << 10),
  158.     codecFlagInterlaceUpdate    = (1L << 11),
  159.     codecFlagCatchUpDiff        = (1L << 12),
  160.     codecFlagUsedNewImageBuffer    = (1L << 14),
  161.     codecFlagUsedImageBuffer    = (1L << 15)
  162. };
  163.  
  164. enum {
  165. /* The minimum data size for spooling in or out data */
  166.     codecMinimumDataSize        = 32768
  167. };
  168.  
  169. enum {
  170.     compressorComponentType        = 'imco',                        /* the type for "Components" which compress images */
  171.     decompressorComponentType    = 'imdc'
  172. };
  173.  
  174. typedef Component CompressorComponent;
  175.  
  176. typedef Component DecompressorComponent;
  177.  
  178. typedef Component CodecComponent;
  179.  
  180. #define anyCodec ((CodecComponent)0)
  181. #define bestSpeedCodec ((CodecComponent)-1)
  182. #define bestFidelityCodec ((CodecComponent)-2)
  183. #define bestCompressionCodec ((CodecComponent)-3)
  184. typedef long CodecType;
  185.  
  186. typedef unsigned short CodecFlags;
  187.  
  188. typedef unsigned long CodecQ;
  189.  
  190.  
  191. enum {
  192.     codecLosslessQuality        = 0x400L,
  193.     codecMaxQuality                = 0x3ffL,
  194.     codecMinQuality                = 0x000L,
  195.     codecLowQuality                = 0x100L,
  196.     codecNormalQuality            = 0x200L,
  197.     codecHighQuality            = 0x300L
  198. };
  199.  
  200. enum {
  201.     codecCompletionSource        = (1 << 0),                        /* asynchronous codec is done with source data */
  202.     codecCompletionDest            = (1 << 1),                        /* asynchronous codec is done with destination data */
  203.     codecCompletionDontUnshield    = (1 << 2)                        /* on dest complete don't unshield cursor */
  204. };
  205.  
  206. enum {
  207.     codecProgressOpen            = 0,
  208.     codecProgressUpdatePercent    = 1,
  209.     codecProgressClose            = 2
  210. };
  211.  
  212. typedef void *ICMCursorNotify;
  213.  
  214. typedef pascal OSErr (*ICMDataProcPtr)(Ptr *dataP, long bytesNeeded, long refcon);
  215. typedef pascal OSErr (*ICMFlushProcPtr)(Ptr data, long bytesAdded, long refcon);
  216. typedef pascal void (*ICMCompletionProcPtr)(OSErr result, short flags, long refcon);
  217. typedef pascal OSErr (*ICMProgressProcPtr)(short message, Fixed completeness, long refcon);
  218. typedef pascal void (*StdPixProcPtr)(PixMap *src, Rect *srcRect, MatrixRecord *matrix, short mode, RgnHandle mask, PixMap *matte, Rect *matteRect, short flags);
  219. typedef pascal void (*ICMAlignmentProcPtr)(Rect *rp, long refcon);
  220. typedef pascal void (*ICMCursorShieldedProcPtr)(const Rect *r, void *refcon, long flags);
  221. typedef pascal void (*ICMMemoryDisposedProcPtr)(Ptr memoryBlock, void *refcon);
  222.  
  223. #if GENERATINGCFM
  224. typedef UniversalProcPtr ICMDataUPP;
  225. typedef UniversalProcPtr ICMFlushUPP;
  226. typedef UniversalProcPtr ICMCompletionUPP;
  227. typedef UniversalProcPtr ICMProgressUPP;
  228. typedef UniversalProcPtr StdPixUPP;
  229. typedef UniversalProcPtr ICMAlignmentUPP;
  230. typedef UniversalProcPtr ICMCursorShieldedUPP;
  231. typedef UniversalProcPtr ICMMemoryDisposedUPP;
  232. #else
  233. typedef ICMDataProcPtr ICMDataUPP;
  234. typedef ICMFlushProcPtr ICMFlushUPP;
  235. typedef ICMCompletionProcPtr ICMCompletionUPP;
  236. typedef ICMProgressProcPtr ICMProgressUPP;
  237. typedef StdPixProcPtr StdPixUPP;
  238. typedef ICMAlignmentProcPtr ICMAlignmentUPP;
  239. typedef ICMCursorShieldedProcPtr ICMCursorShieldedUPP;
  240. typedef ICMMemoryDisposedProcPtr ICMMemoryDisposedUPP;
  241. #endif
  242.  
  243. typedef long ImageSequence;
  244.  
  245. typedef long ImageSequenceDataSource;
  246.  
  247. struct ICMProgressProcRecord {
  248.     ICMProgressUPP                    progressProc;
  249.     long                            progressRefCon;
  250. };
  251. typedef struct ICMProgressProcRecord ICMProgressProcRecord, *ICMProgressProcRecordPtr;
  252.  
  253. struct ICMCompletionProcRecord {
  254.     ICMCompletionUPP                completionProc;
  255.     long                            completionRefCon;
  256. };
  257. typedef struct ICMCompletionProcRecord ICMCompletionProcRecord, *ICMCompletionProcRecordPtr;
  258.  
  259. struct ICMDataProcRecord {
  260.     ICMDataUPP                        dataProc;
  261.     long                            dataRefCon;
  262. };
  263. typedef struct ICMDataProcRecord ICMDataProcRecord, *ICMDataProcRecordPtr;
  264.  
  265. struct ICMFlushProcRecord {
  266.     ICMFlushUPP                        flushProc;
  267.     long                            flushRefCon;
  268. };
  269. typedef struct ICMFlushProcRecord ICMFlushProcRecord, *ICMFlushProcRecordPtr;
  270.  
  271. struct ICMAlignmentProcRecord {
  272.     ICMAlignmentUPP                    alignmentProc;
  273.     long                            alignmentRefCon;
  274. };
  275. typedef struct ICMAlignmentProcRecord ICMAlignmentProcRecord, *ICMAlignmentProcRecordPtr;
  276.  
  277. struct DataRateParams {
  278.     long                            dataRate;
  279.     long                            dataOverrun;
  280.     long                            frameDuration;
  281.     long                            keyFrameRate;
  282.     CodecQ                            minSpatialQuality;
  283.     CodecQ                            minTemporalQuality;
  284. };
  285. typedef struct DataRateParams DataRateParams, *DataRateParamsPtr;
  286.  
  287. struct ImageDescription {
  288.     long                            idSize;                        /* total size of ImageDescription including extra data ( CLUTs and other per sequence data */
  289.     CodecType                        cType;                        /* what kind of codec compressed this data */
  290.     long                            resvd1;                        /* reserved for Apple use */
  291.     short                            resvd2;                        /* reserved for Apple use */
  292.     short                            dataRefIndex;                /* set to zero  */
  293.     short                            version;                    /* which version is this data */
  294.     short                            revisionLevel;                /* what version of that codec did this */
  295.     long                            vendor;                        /* whose  codec compressed this data */
  296.     CodecQ                            temporalQuality;            /* what was the temporal quality factor  */
  297.     CodecQ                            spatialQuality;                /* what was the spatial quality factor */
  298.     short                            width;                        /* how many pixels wide is this data */
  299.     short                            height;                        /* how many pixels high is this data */
  300.     Fixed                            hRes;                        /* horizontal resolution */
  301.     Fixed                            vRes;                        /* vertical resolution */
  302.     long                            dataSize;                    /* if known, the size of data for this image descriptor */
  303.     short                            frameCount;                    /* number of frames this description applies to */
  304.     Str31                            name;                        /* name of codec ( in case not installed )  */
  305.     short                            depth;                        /* what depth is this data (1-32) or ( 33-40 grayscale ) */
  306.     short                            clutID;                        /* clut id or if 0 clut follows  or -1 if no clut */
  307. };
  308. typedef struct ImageDescription ImageDescription, *ImageDescriptionPtr, **ImageDescriptionHandle;
  309.  
  310. struct CodecInfo {
  311.     Str31                            typeName;                    /* name of the codec type i.e.: 'Apple Image Compression' */
  312.     short                            version;                    /* version of the codec data that this codec knows about */
  313.     short                            revisionLevel;                /* revision level of this codec i.e: 0x00010001 (1.0.1) */
  314.     long                            vendor;                        /* Maker of this codec i.e: 'appl' */
  315.     long                            decompressFlags;            /* codecInfo flags for decompression capabilities */
  316.     long                            compressFlags;                /* codecInfo flags for compression capabilities */
  317.     long                            formatFlags;                /* codecInfo flags for compression format details */
  318.     UInt8                            compressionAccuracy;        /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */
  319.     UInt8                            decompressionAccuracy;        /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */
  320.     unsigned short                    compressionSpeed;            /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown)  */
  321.     unsigned short                    decompressionSpeed;            /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown)  */
  322.     UInt8                            compressionLevel;            /* measure (1-255) of compression level of this codec (0 if unknown)  */
  323.     UInt8                            resvd;                        /* pad */
  324.     short                            minimumHeight;                /* minimum height of image (block size) */
  325.     short                            minimumWidth;                /* minimum width of image (block size) */
  326.     short                            decompressPipelineLatency;    /* in milliseconds ( for asynchronous codecs ) */
  327.     short                            compressPipelineLatency;    /* in milliseconds ( for asynchronous codecs ) */
  328.     long                            privateData;
  329. };
  330. typedef struct CodecInfo CodecInfo;
  331.  
  332. struct CodecNameSpec {
  333.     CodecComponent                    codec;
  334.     CodecType                        cType;
  335.     Str31                            typeName;
  336.     Handle                            name;
  337. };
  338. typedef struct CodecNameSpec CodecNameSpec;
  339.  
  340. struct CodecNameSpecList {
  341.     short                            count;
  342.     CodecNameSpec                    list[1];
  343. };
  344. typedef struct CodecNameSpecList CodecNameSpecList, *CodecNameSpecListPtr;
  345.  
  346.  
  347. enum {
  348.     defaultDither                = 0,
  349.     forceDither                    = 1,
  350.     suppressDither                = 2,
  351.     useColorMatching            = 4
  352. };
  353.  
  354. struct ICMFrameTimeRecord {
  355.     wide                            value;                        /* frame time*/
  356.     long                            scale;                        /* timescale of value/duration fields*/
  357.     void                            *base;                        /* timebase*/
  358.     long                            duration;                    /* duration frame is to be displayed (0 if unknown)*/
  359.     Fixed                            rate;                        /* rate of timebase relative to wall-time*/
  360. };
  361. typedef struct ICMFrameTimeRecord ICMFrameTimeRecord, *ICMFrameTimePtr;
  362.  
  363.  
  364. #if GENERATINGCFM
  365. #else
  366. #endif
  367.  
  368. enum {
  369.     uppICMDataProcInfo = kPascalStackBased
  370.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  371.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr*)))
  372.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  373.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  374.     uppICMFlushProcInfo = kPascalStackBased
  375.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  376.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  377.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  378.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  379.     uppICMCompletionProcInfo = kPascalStackBased
  380.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(OSErr)))
  381.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  382.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  383.     uppICMProgressProcInfo = kPascalStackBased
  384.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  385.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  386.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Fixed)))
  387.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  388.     uppStdPixProcInfo = kPascalStackBased
  389.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(PixMap*)))
  390.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Rect*)))
  391.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(MatrixRecord*)))
  392.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  393.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(RgnHandle)))
  394.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(PixMap*)))
  395.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(Rect*)))
  396.          | STACK_ROUTINE_PARAMETER(8, SIZE_CODE(sizeof(short))),
  397.     uppICMAlignmentProcInfo = kPascalStackBased
  398.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Rect*)))
  399.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long))),
  400.     uppICMCursorShieldedProcInfo = kPascalStackBased
  401.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Rect*)))
  402.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void*)))
  403.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  404.     uppICMMemoryDisposedProcInfo = kPascalStackBased
  405.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  406.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void*)))
  407. };
  408.  
  409. #if GENERATINGCFM
  410. #define NewICMDataProc(userRoutine)        \
  411.         (ICMDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMDataProcInfo, GetCurrentArchitecture())
  412. #define NewICMFlushProc(userRoutine)        \
  413.         (ICMFlushUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMFlushProcInfo, GetCurrentArchitecture())
  414. #define NewICMCompletionProc(userRoutine)        \
  415.         (ICMCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCompletionProcInfo, GetCurrentArchitecture())
  416. #define NewICMProgressProc(userRoutine)        \
  417.         (ICMProgressUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMProgressProcInfo, GetCurrentArchitecture())
  418. #define NewStdPixProc(userRoutine)        \
  419.         (StdPixUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppStdPixProcInfo, GetCurrentArchitecture())
  420. #define NewICMAlignmentProc(userRoutine)        \
  421.         (ICMAlignmentUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMAlignmentProcInfo, GetCurrentArchitecture())
  422. #define NewICMCursorShieldedProc(userRoutine)        \
  423.         (ICMCursorShieldedUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCursorShieldedProcInfo, GetCurrentArchitecture())
  424. #define NewICMMemoryDisposedProc(userRoutine)        \
  425.         (ICMMemoryDisposedUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMMemoryDisposedProcInfo, GetCurrentArchitecture())
  426. #else
  427. #define NewICMDataProc(userRoutine)        \
  428.         ((ICMDataUPP) (userRoutine))
  429. #define NewICMFlushProc(userRoutine)        \
  430.         ((ICMFlushUPP) (userRoutine))
  431. #define NewICMCompletionProc(userRoutine)        \
  432.         ((ICMCompletionUPP) (userRoutine))
  433. #define NewICMProgressProc(userRoutine)        \
  434.         ((ICMProgressUPP) (userRoutine))
  435. #define NewStdPixProc(userRoutine)        \
  436.         ((StdPixUPP) (userRoutine))
  437. #define NewICMAlignmentProc(userRoutine)        \
  438.         ((ICMAlignmentUPP) (userRoutine))
  439. #define NewICMCursorShieldedProc(userRoutine)        \
  440.         ((ICMCursorShieldedUPP) (userRoutine))
  441. #define NewICMMemoryDisposedProc(userRoutine)        \
  442.         ((ICMMemoryDisposedUPP) (userRoutine))
  443. #endif
  444.  
  445. #if GENERATINGCFM
  446. #define CallICMDataProc(userRoutine, dataP, bytesNeeded, refcon)        \
  447.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMDataProcInfo, (dataP), (bytesNeeded), (refcon))
  448. #define CallICMFlushProc(userRoutine, data, bytesAdded, refcon)        \
  449.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMFlushProcInfo, (data), (bytesAdded), (refcon))
  450. #define CallICMCompletionProc(userRoutine, result, flags, refcon)        \
  451.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMCompletionProcInfo, (result), (flags), (refcon))
  452. #define CallICMProgressProc(userRoutine, message, completeness, refcon)        \
  453.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMProgressProcInfo, (message), (completeness), (refcon))
  454. #define CallStdPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags)        \
  455.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppStdPixProcInfo, (src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
  456. #define CallICMAlignmentProc(userRoutine, rp, refcon)        \
  457.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMAlignmentProcInfo, (rp), (refcon))
  458. #define CallICMCursorShieldedProc(userRoutine, r, refcon, flags)        \
  459.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMCursorShieldedProcInfo, (r), (refcon), (flags))
  460. #define CallICMMemoryDisposedProc(userRoutine, memoryBlock, refcon)        \
  461.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMMemoryDisposedProcInfo, (memoryBlock), (refcon))
  462. #else
  463. #define CallICMDataProc(userRoutine, dataP, bytesNeeded, refcon)        \
  464.         (*(userRoutine))((dataP), (bytesNeeded), (refcon))
  465. #define CallICMFlushProc(userRoutine, data, bytesAdded, refcon)        \
  466.         (*(userRoutine))((data), (bytesAdded), (refcon))
  467. #define CallICMCompletionProc(userRoutine, result, flags, refcon)        \
  468.         (*(userRoutine))((result), (flags), (refcon))
  469. #define CallICMProgressProc(userRoutine, message, completeness, refcon)        \
  470.         (*(userRoutine))((message), (completeness), (refcon))
  471. #define CallStdPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags)        \
  472.         (*(userRoutine))((src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
  473. #define CallICMAlignmentProc(userRoutine, rp, refcon)        \
  474.         (*(userRoutine))((rp), (refcon))
  475. #define CallICMCursorShieldedProc(userRoutine, r, refcon, flags)        \
  476.         (*(userRoutine))((r), (refcon), (flags))
  477. #define CallICMMemoryDisposedProc(userRoutine, memoryBlock, refcon)        \
  478.         (*(userRoutine))((memoryBlock), (refcon))
  479. #endif
  480.  
  481. extern pascal OSErr CodecManagerVersion(long *version)
  482.  TWOWORDINLINE(0x7000, 0xAAA3);
  483. extern pascal OSErr GetCodecNameList(CodecNameSpecListPtr *list, short showAll)
  484.  TWOWORDINLINE(0x7001, 0xAAA3);
  485. extern pascal OSErr DisposeCodecNameList(CodecNameSpecListPtr list)
  486.  TWOWORDINLINE(0x700F, 0xAAA3);
  487. extern pascal OSErr GetCodecInfo(CodecInfo *info, CodecType cType, CodecComponent codec)
  488.  TWOWORDINLINE(0x7003, 0xAAA3);
  489. extern pascal OSErr GetMaxCompressionSize(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecQ quality, CodecType cType, CompressorComponent codec, long *size)
  490.  TWOWORDINLINE(0x7004, 0xAAA3);
  491. extern pascal OSErr GetCompressionTime(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecType cType, CompressorComponent codec, CodecQ *spatialQuality, CodecQ *temporalQuality, unsigned long *compressTime)
  492.  TWOWORDINLINE(0x7005, 0xAAA3);
  493. extern pascal OSErr CompressImage(PixMapHandle src, const Rect *srcRect, CodecQ quality, CodecType cType, ImageDescriptionHandle desc, Ptr data)
  494.  TWOWORDINLINE(0x7006, 0xAAA3);
  495. extern pascal OSErr FCompressImage(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecQ quality, CodecType cType, CompressorComponent codec, CTabHandle clut, CodecFlags flags, long bufferSize, ICMFlushProcRecordPtr flushProc, ICMProgressProcRecordPtr progressProc, ImageDescriptionHandle desc, Ptr data)
  496.  TWOWORDINLINE(0x7007, 0xAAA3);
  497. extern pascal OSErr DecompressImage(Ptr data, ImageDescriptionHandle desc, PixMapHandle dst, const Rect *srcRect, const Rect *dstRect, short mode, RgnHandle mask)
  498.  TWOWORDINLINE(0x7008, 0xAAA3);
  499. extern pascal OSErr FDecompressImage(Ptr data, ImageDescriptionHandle desc, PixMapHandle dst, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, PixMapHandle matte, const Rect *matteRect, CodecQ accuracy, DecompressorComponent codec, long bufferSize, ICMDataProcRecordPtr dataProc, ICMProgressProcRecordPtr progressProc)
  500.  TWOWORDINLINE(0x7009, 0xAAA3);
  501. extern pascal OSErr CompressSequenceBegin(ImageSequence *seqID, PixMapHandle src, PixMapHandle prev, const Rect *srcRect, const Rect *prevRect, short colorDepth, CodecType cType, CompressorComponent codec, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate, CTabHandle clut, CodecFlags flags, ImageDescriptionHandle desc)
  502.  TWOWORDINLINE(0x700A, 0xAAA3);
  503. extern pascal OSErr CompressSequenceFrame(ImageSequence seqID, PixMapHandle src, const Rect *srcRect, CodecFlags flags, Ptr data, long *dataSize, UInt8 *similarity, ICMCompletionProcRecordPtr asyncCompletionProc)
  504.  TWOWORDINLINE(0x700B, 0xAAA3);
  505. extern pascal OSErr DecompressSequenceBegin(ImageSequence *seqID, ImageDescriptionHandle desc, CGrafPtr port, GDHandle gdh, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, CodecFlags flags, CodecQ accuracy, DecompressorComponent codec)
  506.  TWOWORDINLINE(0x700D, 0xAAA3);
  507. extern pascal OSErr DecompressSequenceBeginS(ImageSequence *seqID, ImageDescriptionHandle desc, Ptr data, long dataSize, CGrafPtr port, GDHandle gdh, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, CodecFlags flags, CodecQ accuracy, DecompressorComponent codec)
  508.  FOURWORDINLINE(0x203C, 0x30, 0x5D, 0xAAA3);
  509. extern pascal OSErr DecompressSequenceFrame(ImageSequence seqID, Ptr data, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc)
  510.  TWOWORDINLINE(0x700E, 0xAAA3);
  511. extern pascal OSErr DecompressSequenceFrameS(ImageSequence seqID, Ptr data, long dataSize, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc)
  512.  FOURWORDINLINE(0x203C, 0x16, 0x47, 0xAAA3);
  513. extern pascal OSErr DecompressSequenceFrameWhen(ImageSequence seqID, Ptr data, long dataSize, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc, const ICMFrameTimeRecord *frameTime)
  514.  FOURWORDINLINE(0x203C, 0x1A, 0x5E, 0xAAA3);
  515. extern pascal OSErr CDSequenceFlush(ImageSequence seqID)
  516.  FOURWORDINLINE(0x203C, 0x4, 0x5F, 0xAAA3);
  517. extern pascal OSErr SetDSequenceMatrix(ImageSequence seqID, MatrixRecordPtr matrix)
  518.  TWOWORDINLINE(0x7010, 0xAAA3);
  519. extern pascal OSErr SetDSequenceMatte(ImageSequence seqID, PixMapHandle matte, const Rect *matteRect)
  520.  TWOWORDINLINE(0x7011, 0xAAA3);
  521. extern pascal OSErr SetDSequenceMask(ImageSequence seqID, RgnHandle mask)
  522.  TWOWORDINLINE(0x7012, 0xAAA3);
  523. extern pascal OSErr SetDSequenceTransferMode(ImageSequence seqID, short mode, const RGBColor *opColor)
  524.  TWOWORDINLINE(0x7013, 0xAAA3);
  525. extern pascal OSErr SetDSequenceDataProc(ImageSequence seqID, ICMDataProcRecordPtr dataProc, long bufferSize)
  526.  TWOWORDINLINE(0x7014, 0xAAA3);
  527. extern pascal OSErr SetDSequenceAccuracy(ImageSequence seqID, CodecQ accuracy)
  528.  TWOWORDINLINE(0x7034, 0xAAA3);
  529. extern pascal OSErr SetDSequenceSrcRect(ImageSequence seqID, const Rect *srcRect)
  530.  TWOWORDINLINE(0x7035, 0xAAA3);
  531. extern pascal OSErr GetDSequenceImageBuffer(ImageSequence seqID, GWorldPtr *gworld)
  532.  TWOWORDINLINE(0x7015, 0xAAA3);
  533. extern pascal OSErr GetDSequenceScreenBuffer(ImageSequence seqID, GWorldPtr *gworld)
  534.  TWOWORDINLINE(0x7016, 0xAAA3);
  535. extern pascal OSErr SetCSequenceQuality(ImageSequence seqID, CodecQ spatialQuality, CodecQ temporalQuality)
  536.  TWOWORDINLINE(0x7017, 0xAAA3);
  537. extern pascal OSErr SetCSequencePrev(ImageSequence seqID, PixMapHandle prev, const Rect *prevRect)
  538.  TWOWORDINLINE(0x7018, 0xAAA3);
  539. extern pascal OSErr SetCSequenceFlushProc(ImageSequence seqID, ICMFlushProcRecordPtr flushProc, long bufferSize)
  540.  TWOWORDINLINE(0x7033, 0xAAA3);
  541. extern pascal OSErr SetCSequenceKeyFrameRate(ImageSequence seqID, long keyframerate)
  542.  TWOWORDINLINE(0x7036, 0xAAA3);
  543. extern pascal OSErr GetCSequenceKeyFrameRate(ImageSequence seqID, long *keyframerate)
  544.  FOURWORDINLINE(0x203C, 0x8, 0x4B, 0xAAA3);
  545. extern pascal OSErr GetCSequencePrevBuffer(ImageSequence seqID, GWorldPtr *gworld)
  546.  TWOWORDINLINE(0x7019, 0xAAA3);
  547. extern pascal OSErr CDSequenceBusy(ImageSequence seqID)
  548.  TWOWORDINLINE(0x701A, 0xAAA3);
  549. extern pascal OSErr CDSequenceEnd(ImageSequence seqID)
  550.  TWOWORDINLINE(0x701B, 0xAAA3);
  551. extern pascal OSErr CDSequenceEquivalentImageDescription(ImageSequence seqID, ImageDescriptionHandle newDesc, Boolean *equivalent)
  552.  FOURWORDINLINE(0x203C, 0xC, 0x65, 0xAAA3);
  553. extern pascal OSErr GetCompressedImageSize(ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, long *dataSize)
  554.  TWOWORDINLINE(0x701C, 0xAAA3);
  555. extern pascal OSErr GetSimilarity(PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle desc, Ptr data, Fixed *similarity)
  556.  TWOWORDINLINE(0x701D, 0xAAA3);
  557. extern pascal OSErr GetImageDescriptionCTable(ImageDescriptionHandle desc, CTabHandle *ctable)
  558.  TWOWORDINLINE(0x701E, 0xAAA3);
  559. extern pascal OSErr SetImageDescriptionCTable(ImageDescriptionHandle desc, CTabHandle ctable)
  560.  TWOWORDINLINE(0x701F, 0xAAA3);
  561. extern pascal OSErr GetImageDescriptionExtension(ImageDescriptionHandle desc, Handle *extension, long idType, long index)
  562.  TWOWORDINLINE(0x7020, 0xAAA3);
  563. extern pascal OSErr AddImageDescriptionExtension(ImageDescriptionHandle desc, Handle extension, long idType)
  564.  TWOWORDINLINE(0x7021, 0xAAA3);
  565. #if GENERATINGPPCLIB
  566. extern pascal OSErr SetImageDescriptionExtension(ImageDescriptionHandle desc, Handle extension, long idType)
  567.  TWOWORDINLINE(0x7021, 0xAAA3);
  568. #endif
  569. extern pascal OSErr RemoveImageDescriptionExtension(ImageDescription **desc, long idType, long index)
  570.  FOURWORDINLINE(0x203C, 0xC, 0x3A, 0xAAA3);
  571. extern pascal OSErr CountImageDescriptionExtensionType(ImageDescription **desc, long idType, long *count)
  572.  FOURWORDINLINE(0x203C, 0xC, 0x3B, 0xAAA3);
  573. extern pascal OSErr GetNextImageDescriptionExtensionType(ImageDescription **desc, long *idType)
  574.  FOURWORDINLINE(0x203C, 0x8, 0x3C, 0xAAA3);
  575. extern pascal OSErr FindCodec(CodecType cType, CodecComponent specCodec, CompressorComponent *compressor, DecompressorComponent *decompressor)
  576.  TWOWORDINLINE(0x7023, 0xAAA3);
  577. extern pascal OSErr CompressPicture(PicHandle srcPicture, PicHandle dstPicture, CodecQ quality, CodecType cType)
  578.  TWOWORDINLINE(0x7024, 0xAAA3);
  579. extern pascal OSErr FCompressPicture(PicHandle srcPicture, PicHandle dstPicture, short colorDepth, CTabHandle clut, CodecQ quality, short doDither, short compressAgain, ICMProgressProcRecordPtr progressProc, CodecType cType, CompressorComponent codec)
  580.  TWOWORDINLINE(0x7025, 0xAAA3);
  581. extern pascal OSErr CompressPictureFile(short srcRefNum, short dstRefNum, CodecQ quality, CodecType cType)
  582.  TWOWORDINLINE(0x7026, 0xAAA3);
  583. extern pascal OSErr FCompressPictureFile(short srcRefNum, short dstRefNum, short colorDepth, CTabHandle clut, CodecQ quality, short doDither, short compressAgain, ICMProgressProcRecordPtr progressProc, CodecType cType, CompressorComponent codec)
  584.  TWOWORDINLINE(0x7027, 0xAAA3);
  585. extern pascal OSErr GetPictureFileHeader(short refNum, Rect *frame, OpenCPicParams *header)
  586.  TWOWORDINLINE(0x7028, 0xAAA3);
  587. extern pascal OSErr DrawPictureFile(short refNum, const Rect *frame, ICMProgressProcRecordPtr progressProc)
  588.  TWOWORDINLINE(0x7029, 0xAAA3);
  589. extern pascal OSErr DrawTrimmedPicture(PicHandle srcPicture, const Rect *frame, RgnHandle trimMask, short doDither, ICMProgressProcRecordPtr progressProc)
  590.  TWOWORDINLINE(0x702E, 0xAAA3);
  591. extern pascal OSErr DrawTrimmedPictureFile(short srcRefnum, const Rect *frame, RgnHandle trimMask, short doDither, ICMProgressProcRecordPtr progressProc)
  592.  TWOWORDINLINE(0x702F, 0xAAA3);
  593. extern pascal OSErr MakeThumbnailFromPicture(PicHandle picture, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  594.  TWOWORDINLINE(0x702A, 0xAAA3);
  595. extern pascal OSErr MakeThumbnailFromPictureFile(short refNum, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  596.  TWOWORDINLINE(0x702B, 0xAAA3);
  597. extern pascal OSErr MakeThumbnailFromPixMap(PixMapHandle src, const Rect *srcRect, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  598.  TWOWORDINLINE(0x702C, 0xAAA3);
  599. extern pascal OSErr TrimImage(ImageDescriptionHandle desc, Ptr inData, long inBufferSize, ICMDataProcRecordPtr dataProc, Ptr outData, long outBufferSize, ICMFlushProcRecordPtr flushProc, Rect *trimRect, ICMProgressProcRecordPtr progressProc)
  600.  TWOWORDINLINE(0x702D, 0xAAA3);
  601. extern pascal OSErr ConvertImage(ImageDescriptionHandle srcDD, Ptr srcData, short colorDepth, CTabHandle clut, CodecQ accuracy, CodecQ quality, CodecType cType, CodecComponent codec, ImageDescriptionHandle dstDD, Ptr dstData)
  602.  TWOWORDINLINE(0x7030, 0xAAA3);
  603. extern pascal OSErr GetCompressedPixMapInfo(PixMapPtr pix, ImageDescriptionHandle *desc, Ptr *data, long *bufferSize, ICMDataProcRecord *dataProc, ICMProgressProcRecord *progressProc)
  604.  TWOWORDINLINE(0x7037, 0xAAA3);
  605. extern pascal OSErr SetCompressedPixMapInfo(PixMapPtr pix, ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, ICMProgressProcRecordPtr progressProc)
  606.  TWOWORDINLINE(0x7038, 0xAAA3);
  607. extern pascal void StdPix(PixMapPtr src, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, PixMapPtr matte, const Rect *matteRect, short flags)
  608.  TWOWORDINLINE(0x700C, 0xAAA3);
  609. extern pascal OSErr TransformRgn(MatrixRecordPtr matrix, RgnHandle rgn)
  610.  TWOWORDINLINE(0x7039, 0xAAA3);
  611. /***********
  612.     preview stuff
  613. ***********/
  614. extern pascal void SFGetFilePreview(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, SFTypeList typeList, DlgHookUPP dlgHook, SFReply *reply)
  615.  TWOWORDINLINE(0x7041, 0xAAA3);
  616. extern pascal void SFPGetFilePreview(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, SFTypeList typeList, DlgHookUPP dlgHook, SFReply *reply, short dlgID, ModalFilterUPP filterProc)
  617.  TWOWORDINLINE(0x7042, 0xAAA3);
  618. extern pascal void StandardGetFilePreview(FileFilterUPP fileFilter, short numTypes, SFTypeList typeList, StandardFileReply *reply)
  619.  TWOWORDINLINE(0x7043, 0xAAA3);
  620. extern pascal void CustomGetFilePreview(FileFilterYDUPP fileFilter, short numTypes, SFTypeList typeList, StandardFileReply *reply, short dlgID, Point where, DlgHookYDUPP dlgHook, ModalFilterYDUPP filterProc, const short *activeList, ActivateYDUPP activateProc, void *yourDataPtr)
  621.  TWOWORDINLINE(0x7044, 0xAAA3);
  622. extern pascal OSErr MakeFilePreview(short resRefNum, ICMProgressProcRecordPtr progress)
  623.  TWOWORDINLINE(0x7045, 0xAAA3);
  624. extern pascal OSErr AddFilePreview(short resRefNum, OSType previewType, Handle previewData)
  625.  TWOWORDINLINE(0x7046, 0xAAA3);
  626.  
  627. enum {
  628.     sfpItemPreviewAreaUser        = 11,
  629.     sfpItemPreviewStaticText    = 12,
  630.     sfpItemPreviewDividerUser    = 13,
  631.     sfpItemCreatePreviewButton    = 14,
  632.     sfpItemShowPreviewButton    = 15
  633. };
  634.  
  635. struct PreviewResourceRecord {
  636.     unsigned long                    modDate;
  637.     short                            version;
  638.     OSType                            resType;
  639.     short                            resID;
  640. };
  641. typedef struct PreviewResourceRecord PreviewResourceRecord, *PreviewResourcePtr, **PreviewResource;
  642.  
  643. extern pascal void AlignScreenRect(Rect *rp, ICMAlignmentProcRecordPtr alignmentProc)
  644.  FOURWORDINLINE(0x203C, 0x8, 0x4C, 0xAAA3);
  645. extern pascal void AlignWindow(WindowPtr wp, Boolean front, const Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  646.  FOURWORDINLINE(0x203C, 0xE, 0x4D, 0xAAA3);
  647. extern pascal void DragAlignedWindow(WindowPtr wp, Point startPt, Rect *boundsRect, Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  648.  FOURWORDINLINE(0x203C, 0x14, 0x4E, 0xAAA3);
  649. extern pascal long DragAlignedGrayRgn(RgnHandle theRgn, Point startPt, Rect *boundsRect, Rect *slopRect, short axis, UniversalProcPtr actionProc, Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  650.  FOURWORDINLINE(0x203C, 0x1E, 0x4F, 0xAAA3);
  651. extern pascal OSErr SetCSequenceDataRateParams(ImageSequence seqID, DataRateParamsPtr params)
  652.  FOURWORDINLINE(0x203C, 0x8, 0x50, 0xAAA3);
  653. extern pascal OSErr SetCSequenceFrameNumber(ImageSequence seqID, long frameNumber)
  654.  FOURWORDINLINE(0x203C, 0x8, 0x51, 0xAAA3);
  655. extern pascal QDErr NewImageGWorld(GWorldPtr *gworld, ImageDescriptionHandle idh, GWorldFlags flags)
  656.  FOURWORDINLINE(0x203C, 0xC, 0x52, 0xAAA3);
  657. extern pascal OSErr GetCSequenceDataRateParams(ImageSequence seqID, DataRateParamsPtr params)
  658.  FOURWORDINLINE(0x203C, 0x8, 0x53, 0xAAA3);
  659. extern pascal OSErr GetCSequenceFrameNumber(ImageSequence seqID, long *frameNumber)
  660.  FOURWORDINLINE(0x203C, 0x8, 0x54, 0xAAA3);
  661. extern pascal OSErr GetBestDeviceRect(GDHandle *gdh, Rect *rp)
  662.  FOURWORDINLINE(0x203C, 0x8, 0x55, 0xAAA3);
  663. extern pascal OSErr SetSequenceProgressProc(ImageSequence seqID, ICMProgressProcRecord *progressProc)
  664.  FOURWORDINLINE(0x203C, 0x8, 0x56, 0xAAA3);
  665. extern pascal OSErr GDHasScale(GDHandle gdh, short depth, Fixed *scale)
  666.  FOURWORDINLINE(0x203C, 0xA, 0x5A, 0xAAA3);
  667. extern pascal OSErr GDGetScale(GDHandle gdh, Fixed *scale, short *flags)
  668.  FOURWORDINLINE(0x203C, 0xC, 0x5B, 0xAAA3);
  669. extern pascal OSErr GDSetScale(GDHandle gdh, Fixed scale, short flags)
  670.  FOURWORDINLINE(0x203C, 0xA, 0x5C, 0xAAA3);
  671. extern pascal OSErr ICMShieldSequenceCursor(ImageSequence seqID)
  672.  FOURWORDINLINE(0x203C, 0x4, 0x62, 0xAAA3);
  673. extern pascal void ICMDecompressComplete(ImageSequence seqID, OSErr err, short flag, ICMCompletionProcRecordPtr completionRtn)
  674.  FOURWORDINLINE(0x203C, 0xC, 0x63, 0xAAA3);
  675. extern pascal OSErr SetDSequenceTimeCode(ImageSequence seqID, void *timeCodeFormat, void *timeCodeTime)
  676.  FOURWORDINLINE(0x203C, 0xC, 0x64, 0xAAA3);
  677. extern pascal OSErr CDSequenceNewMemory(ImageSequence seqID, Ptr *data, Size dataSize, long dataUse, ICMMemoryDisposedUPP memoryGoneProc, void *refCon)
  678.  FOURWORDINLINE(0x203C, 0x18, 0x66, 0xAAA3);
  679. extern pascal OSErr CDSequenceDisposeMemory(ImageSequence seqID, Ptr data)
  680.  FOURWORDINLINE(0x203C, 0x8, 0x67, 0xAAA3);
  681. extern pascal OSErr CDSequenceNewDataSource(ImageSequence seqID, ImageSequenceDataSource *sourceID, OSType sourceType, long sourceInputNumber, Handle dataDescription, void *transferProc, void *refCon)
  682.  FOURWORDINLINE(0x203C, 0x1C, 0x68, 0xAAA3);
  683. extern pascal OSErr CDSequenceDisposeDataSource(ImageSequenceDataSource sourceID)
  684.  FOURWORDINLINE(0x203C, 0x4, 0x69, 0xAAA3);
  685. extern pascal OSErr CDSequenceSetSourceData(ImageSequenceDataSource sourceID, void *data)
  686.  FOURWORDINLINE(0x203C, 0x8, 0x6A, 0xAAA3);
  687. extern pascal OSErr CDSequenceChangedSourceData(ImageSequenceDataSource sourceID)
  688.  FOURWORDINLINE(0x203C, 0x4, 0x6B, 0xAAA3);
  689. extern pascal OSErr PtInDSequenceData(ImageSequence seqID, void *data, Size dataSize, Point where, Boolean *hit)
  690.  FOURWORDINLINE(0x203C, 0x14, 0x6C, 0xAAA3);
  691.  
  692. enum {
  693.     identityMatrixType            = 0x00,                            /* result if matrix is identity */
  694.     translateMatrixType            = 0x01,                            /* result if matrix translates */
  695.     scaleMatrixType                = 0x02,                            /* result if matrix scales */
  696.     scaleTranslateMatrixType    = 0x03,                            /* result if matrix scales and translates */
  697.     linearMatrixType            = 0x04,                            /* result if matrix is general 2 x 2 */
  698.     linearTranslateMatrixType    = 0x05,                            /* result if matrix is general 2 x 2 and translates */
  699.     perspectiveMatrixType        = 0x06                            /* result if matrix is general 3 x 3 */
  700. };
  701.  
  702. typedef unsigned short MatrixFlags;
  703.  
  704. extern pascal short GetMatrixType(const MatrixRecord *m)
  705.  TWOWORDINLINE(0x7014, 0xABC2);
  706. extern pascal void CopyMatrix(const MatrixRecord *m1, MatrixRecord *m2)
  707.  TWOWORDINLINE(0x7020, 0xABC2);
  708. extern pascal Boolean EqualMatrix(const MatrixRecord *m1, const MatrixRecord *m2)
  709.  TWOWORDINLINE(0x7021, 0xABC2);
  710. extern pascal void SetIdentityMatrix(MatrixRecord *matrix)
  711.  TWOWORDINLINE(0x7015, 0xABC2);
  712. extern pascal void TranslateMatrix(MatrixRecord *m, Fixed deltaH, Fixed deltaV)
  713.  TWOWORDINLINE(0x7019, 0xABC2);
  714. extern pascal void RotateMatrix(MatrixRecord *m, Fixed degrees, Fixed aboutX, Fixed aboutY)
  715.  TWOWORDINLINE(0x7016, 0xABC2);
  716. extern pascal void ScaleMatrix(MatrixRecord *m, Fixed scaleX, Fixed scaleY, Fixed aboutX, Fixed aboutY)
  717.  TWOWORDINLINE(0x7017, 0xABC2);
  718. extern pascal void SkewMatrix(MatrixRecord *m, Fixed skewX, Fixed skewY, Fixed aboutX, Fixed aboutY)
  719.  TWOWORDINLINE(0x7018, 0xABC2);
  720. extern pascal OSErr TransformFixedPoints(const MatrixRecord *m, FixedPoint *fpt, long count)
  721.  TWOWORDINLINE(0x7022, 0xABC2);
  722. extern pascal OSErr TransformPoints(const MatrixRecord *mp, Point *pt1, long count)
  723.  TWOWORDINLINE(0x7023, 0xABC2);
  724. extern pascal Boolean TransformFixedRect(const MatrixRecord *m, FixedRect *fr, FixedPoint *fpp)
  725.  TWOWORDINLINE(0x7024, 0xABC2);
  726. extern pascal Boolean TransformRect(const MatrixRecord *m, Rect *r, FixedPoint *fpp)
  727.  TWOWORDINLINE(0x7025, 0xABC2);
  728. extern pascal Boolean InverseMatrix(const MatrixRecord *m, MatrixRecord *im)
  729.  TWOWORDINLINE(0x701C, 0xABC2);
  730. extern pascal void ConcatMatrix(const MatrixRecord *a, MatrixRecord *b)
  731.  TWOWORDINLINE(0x701B, 0xABC2);
  732. extern pascal void RectMatrix(MatrixRecord *matrix, const Rect *srcRect, const Rect *dstRect)
  733.  TWOWORDINLINE(0x701E, 0xABC2);
  734. extern pascal void MapMatrix(MatrixRecord *matrix, const Rect *fromRect, const Rect *toRect)
  735.  TWOWORDINLINE(0x701D, 0xABC2);
  736.  
  737. #ifdef __CFM68K__
  738. #pragma import off
  739. #endif
  740.  
  741. #if GENERATINGPOWERPC
  742. #pragma options align=reset
  743. #endif
  744.  
  745. #ifdef __cplusplus
  746. }
  747. #endif
  748.  
  749. #endif /* __IMAGECOMPRESSION__ */
  750.